<?php

namespace App\Models;

class User extends Base
{
    protected $guarded = [];

    public function scopeOpenid($query, $openid)
    {
        if ($openid) {
            return $query->where('openid', $openid);
        } else {
            return $query;
        }
    }
}
